package com.data.deal.controller;

import com.alibaba.fastjson.JSONObject;
import com.data.deal.service.DataDealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/data-deal")
public class DataDealController {

    @Autowired
    private DataDealService dataDealService;

    @PostMapping("/getData")
    public JSONObject dealData(@RequestBody JSONObject jsonObject) {
        dataDealService.moveGhostSaProData();
        return new JSONObject() {{
            put("msg", "success!");
        }};
    }
}
